###

package com.kylin.module.${table.replace("_","")}.business;

import org.apache.log4j.Logger;

import com.kylin.common.entity.QueryInfo;
import com.kylin.common.exception.BusinessException;
import com.kylin.common.paginate.DisplayPage;
import com.kylin.common.paginate.PageManager;

import com.kylin.module.${table.replace("_","")}.form.${Table}Form;

import com.kylin.module.${table.replace("_","")}.orm.${Table};
import com.kylin.module.${table.replace("_","")}.orm.${Table}DAO;

#for  $cl in $PTable
#if $cl.seq == ''
import com.kylin.module.${cl.name}.orm.${cl.class}DAO;
import com.kylin.module.${cl.name}.orm.${cl.class};
#else
// ${cl.class} $cl.seq
#end if
#end for

public class ${Table}BusinessBean {
	protected static Logger log = Logger.getLogger(${Table}BusinessBean.class);
	
    public void save(${Table}Form form) throws BusinessException{
    	${Table}DAO dao = new ${Table}DAO();
    	${Table} com = new ${Table}();
    	
    	/*
    	com.setName(form.getName());
    	com.setCountry(form.getCountry());
    	com.setLanguage(form.getLanguage());
    	com.setUptime(form.getUptime());
    	   	
    	Testdict1 dict1 = Testdict1DAO.findByCode(form.getTrade());
    	com.setTestDict1(dict1);
    	Testdict2 dict2 = Testdict2DAO.findByCode(form.getType());
    	com.setTestDict2(dict2);
    	dao.save(com);
    	*/
    }
    
    public DisplayPage search(int pageNum, QueryInfo queryInfo ) throws BusinessException{
    	log.info("search page "+pageNum);
    	int size = 4;
    	DisplayPage page = PageManager.getDisplayPage(size, pageNum, queryInfo);
    	return page;
    }

}
